
// 正整数
export const customReg = {
  mounted(el, binding, vnode) {
    el.addEventListener('input', function(e) {
      const input = e.target;
      const currentValue = input.value;
      const newValue = currentValue.replace(binding.value, ''); // 仅保留数字字符
      input.value = newValue;
    });
  },
};